import React from 'react'

class WorkTools extends React.Component {

  constructor(props) {
    super(props)
  }

  onDataSearch(event) {
    var input = event.target;
    var value = $(input).val();
    this.props.onDataSearch(value)
  }

  onAllCheckChanged(event) {
    var value = event.target.checked
    this.props.onAllCheckChanged(value)
  }

  render() {
    return (
      <div className="demo-setting-tools row">
        <div className="checkbox col-xs-1 col-sm-1 col-sm-offset-6 col-xs-offset-6">
          <label><input type="checkbox" value="" onChange={(event)=>this.onAllCheckChanged(event)}/>全部</label>
        </div>
        <div className="col-xs-2 col-sm-2 ">
          <button type="button" className="btn-create"
                onClick={(event)=>this.props.onCreateClick()}>创建</button>
        </div>
        <div className="col-xs-3 col-sm-3">

          <div className="input-group search-group">
            <i className="ti-search"></i>
            <input type="text" className="form-control" placeholder="请搜索户号"
                    onChange={(event)=>this.onDataSearch(event)}/>
          </div>
        </div>


      </div>
    )
  }

}

export default WorkTools
